<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>pdf模拟测试</title>
    <link href="//unpkg.com/layui@2.8.0/dist/css/layui.css" rel="stylesheet">
    <style>
        body {
            display: flex;
        }
        .container {
            width: 70%; /* 左侧占一半宽度 */
            padding: 20px;
            border: 1px solid #ccc;
        }


    </style>
</head>
<body>
<div class="container">
    <!-- 这里放你的原始内容 -->
    <div style="height: 80px">
        <h3>测试服务器ip： 223.70.139.221</h3>
        <h3>测试服务器端口： 8888;</h3>
        <hr>
    </div>
    <div class="layui-btn-container">
        <h3 style="color: red">``` 代理客户端签章-生成文档摘要（关键字定位为例）</h3><br>

        <!-- HTML部分 -->
        <form id="pdfForm"  enctype="multipart/form-data">
            <label>签名证书</label>
            <input type="text" name="ukeyCert"  value="MIIE1DCCBHugAwIBAgIKGhAAAAAAAXl9HzAKBggqgRzPVQGDdTBEMQswCQYDVQQGEwJDTjENMAsGA1UECgwEQkpDQTENMAsGA1UECwwEQkpDQTEXMBUGA1UEAwwOQmVpamluZyBTTTIgQ0EwHhcNMjAwOTAzMTYwMDAwWhcNMjQwMzA2MTU1OTU5WjCBqjEbMBkGA1UEKQwSOTE0MTAxMDU3Nzk0MTIzNjYwMS0wKwYDVQQDDCTmsrPljZfnnIHmlrDmmajpo57nlLXlrZDmnInpmZDlhazlj7gxLTArBgNVBAoMJOays+WNl+ecgeaWsOaZqOmjnueUteWtkOaciemZkOWFrOWPuDEPMA0GA1UEBwwG6YOR5beeMQ8wDQYDVQQIDAbmsrPljZcxCzAJBgNVBAYMAkNOMFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEqMSKvh6brISQQKPduUQvFUXzsSCmaFhhNAINnr/D6Tmv8VBcKbi0h1XyzH8Vtu4Q0ErwF02SzWjO8Pt+saxdKqOCAuwwggLoMB8GA1UdIwQYMBaAFB/mz9SPxSIql0opihXnFsmSNMS2MB0GA1UdDgQWBBTQ8OS52YX5vt/OnVHBhUoN7gjdmTALBgNVHQ8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px" class="layui-input">
            <span>签章图片</span>
            <input type="text" name="sealImg"  value="R0lGODlhoACgAOMAALo/QrlKOLZjXsk9MdM/Qs9NOtRfVs95hLeEd9KGebiOi9+hnfS7w/DFuf79/AAAACH5BAEAAA4ALAAAAACgAKAAAAT+0MlJq7046827/2AojmRpnmiqrmzrvvDIMM1iJ3hi7Lyh+7ZFoxErGle0hWBpKDh3zgI0So02DYLEkHjsejULrHQqrT7NZeqVlx1+30eFoKlW0+toNPmZYMD/KUNhd2aEPThBQQmDP3Q8VWtaXICUHQsHPVUDBARSbX4kNThkA3Y+k5WpFA06kI87i6AsrFCGbKiqfzVXepJfu2djPEK5cAJ6UgduobghDQwJc2tjAs3FLgutkAdaH7iCWIE/rgvXMEpS2unWG3NZTEwG7CIMg09s5eYqrGqj3SNNbAyZ4UAHh2UdkuwBou8EOjv5SugQsiVbOA0NpBHzQIuQlHn+DTWo4wPyn8gxBeCd2jDkxwElICeEIRfS25xOViJiaIAlJk8tshyEAdFR5wZ7jhDUZNnK0aKYDuYoY2mAYkUdUCvgcDZuTdZrGe1ktSHA6M4dS5Ys6knUh4QDAj4omUKg6tIKc60supAAAZdddjtkXBDUAbSX3uQJZSuX1w4FdyXMLOMWA7SqPH0YKHy2aqIbO/x62MpzagikTkw2VLeDc4WMWBJICMxyDoJFAmsM/CCJ9og5aaqF7CrFrIUwi6ayokD4Ak/jBYn6rWyCte9cCAgJ18BAgOnA2x1gspZFwrNn2RB7YIAFuogFEK81Tbd+2VahBxRC98wtC6KNHcz+IdsKkz3h3hfa7HCgBQ0goEwNDtCSAFwDXkDdBdkcVJYBSglWQXfNaLegEdlJUdeIDGJ2QEGwzMbODufRUANoioFRTXZQhYEKjClGEcB1X8BnRVwjZJhNPqLtxVdKaGEhjTxQZbfYguwVUKE0GDwUxVcsFFgAZBJNOEl3EhBpAVY4QFMOfBViVN5zG8BiF3IYkbEZc1wWeQeQcgl3HxGKTXjBHAXFxV5GbdaZT1kaLEFEA3DxaYF2rr2QmRUm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tRDgrAk7lAKn9hiBZFbF7ALTQYOhPZgIymfoBoCf0FB3rJIRYQKUYRcdioM+1UgnrWW4QZSGZhe0z0EllZf7vAQZDScqkik5VQmGCYHc0YGdYERj+hSnsCk0HyIz3GDrIxS0p4HaK5bM1ymaUimc5RDfoHTFxYOuIGb7JXDIcGZRagAAjwVqWDkrlwmi7UmeDVELChTx6QlqpgNJDzJKMHnTVGVXNjm4iomvoll2/wJHjVWolSGmR4Ao5ZEBkjBQCQni8wUnn+d0XqY0HeqZ7WAZ/nQFuXBVewKR7qIQ5oFZ3SdZ8qgIQ9EJJiMwRn6AOBOZrOERSwoZpHsZawAoANpiDz8A4Vchm+EU06MSFvlW8UwAOixQHWh4OHyA+pNk2yhmtcxn7RKQs3B1CJ5ANrZDiOYZKu2AhqMBZVsTtcCTLHR6MX2kNaoFqrMAgnF3C3uHOmABWY4CyhwkmSsTVhhaVhsEZV1CCPwAls6ZBYpzRXsHRZNSkGVDp0UjYKRoLzsHbm1Z9iSnNUZiWMdJhLsxscEQ/bYKCLiWoaCghD0DRRMABooZ/idwD1dg+W6VioFUkK929zmhDwticfJxCKaRkdOB91veCnn1Sp09AVCJkbQeUGMpIDTOAEJ+cKATqphuaBO8ZjUAAAaDEHP8IGX1oXkFAAYNoEKeeqQ1djPLerOlasrgehwGopQtFFvmashVCrFJesgsqOfGpeUjcrViGtIbFhOaBHiLCe2hqu4jqu5Fqu5nquGxABADs=" id="sealImg" placeholder="" style="width: 300px" class="layui-input">

            <span> 印章图片宽度</span>
            <input type="text" name="sealImgWide"  value="100" id="sealImgWide" placeholder="" style="width: 300px" class="layui-input">

            <span> 印章图片高度</span>
            <input type="text" name="sealImgHigh"  value="100" id="sealImgHigh" placeholder="" style="width: 300px" class="layui-input">

            <span> 印章移动类型</span>
            <input type="text" name="moveType"  value="3" id="moveType" placeholder="印章移动类型 1:重叠、2: 居下、3:居右,默认居右" style="width: 300px" class="layui-input">

            <span> 关键字</span>
            <input type="text" name="keyword"  value="北京" id="keyword" placeholder="关键字" style="width: 300px" class="layui-input">

            <span> 第几个关键字</span>
            <input type="text" name="searchOrder"  value="1" id="searchOrder" placeholder="" style="width: 300px" class="layui-input">

            <span> 上下偏移量</span>
            <input type="text" name="HeightMoveSize"  value="1" id="HeightMoveSize" placeholder="" style="width: 300px" class="layui-input">
            <span> 左右偏移量</span>
            <input type="text" name="MoveSize"  value="1" id="MoveSize" placeholder="" style="width: 300px" class="layui-input">


            <span>选择pdf文件</span>
            <input type="file"  id="fileInput"  name="file" class="layui-btn demo-class-accept">
            <input type="button"  value="提交" id="submitButton" onclick="  check()" class="layui-btn demo-class-accept">

        </form>

        <div style="height: 80px">
            <!-- ... -->
        </div>
        <div class="layui-form">

            <hr class="ws-space-16">
            <textarea name="" id="myTextarea" placeholder="多行文本框" class="layui-textarea" style="height: 300px">
        </textarea>
        </div>
    </div>
</div>

<!-- JavaScript部分 -->
<script src="//unpkg.com/layui@2.8.0/dist/layui.js"></script>
<script src="https://cdn.staticfile.org/jquery/3.5.1/jquery.min.js"></script>



<script>
    function check() {
        document.getElementById("myTextarea").value = "获取结果中......";
        var fileInput = $("#fileInput");


        if (fileInput.get(0).files.length === 0) {
            alert("未选择文件");
            return false;
        }

        var formData = new FormData($("#pdfForm")[0]);
        $.ajax({
            url: "/getPDFHashByKeyword",
            type: "POST",
            data: formData,
            processData: false,
            contentType: false,
            success: function(response) {

                if(response.code==200){

                    document.getElementById("myTextarea").value = response.map['statecode'];

                }
                else {
                    layer.open({
                        title: '提示',
                        content:response.msg ,
                    });
                }


            },
            error: function(xhr, status, error) {
                // Handle error response from the server
                alert("服务端错误: " + error);
            }
        });
    }








</script>


</body>
</html>